use  "HS_inequality_graph.dta", clear

foreach t in "1900" "1910" "1920" "1925" "1930" "1935" "1940" "1950"  "1978" "1982" "1987" "1992" "1997" "2002" "2007" "2012" "2017"{

gen large_share`t' = fbs_1000`t'/(fbs_0109`t' + fbs_1049`t' + fbs_50179`t' + fbs_180499`t' +fbs_500999`t' + fbs_1000`t' )
gen small_share`t' = (fbs_0109`t' + fbs_1049`t' + fbs_50179`t')/(fbs_0109`t' + fbs_1049`t' + fbs_50179`t' + fbs_180499`t' +fbs_500999`t' + fbs_1000`t' )

}



reshape long large_share small_share  GiniAg, i(fips gisjoin) j(year)


lgraph GiniAg  year ,wide addplot(connected large_share year, yaxis(2) mcolor(gs5) lcolor(gs5) ) alsocollapse(large_share) scheme(s1mono) xlabel(1900(20)2017) ytitle("Farm Size Gini", axis(1) ) ytitle("Share of Farms > 1,000 Acres", axis(2)) legend(on label(1 "Farm Size Gini") label (2 "Share of Farms > 1,000 Acres"))
